package cn.ly.jmockittest;

import cn.ly.easymocktest.User;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by liuyu21 on 2017/10/22.
 */
public class Dao{
    private Map<String, Integer> groupCounts = new HashMap<String, Integer>();

    /**
     * 假数据
     */
    {
        this.groupCounts.put("A", 500);
        this.groupCounts.put("B", 1000);
        this.groupCounts.put("C", 1200);
    }

    public int getStoreCount(String group) {
        Integer count = this.groupCounts.get(group);

        return null == count ? -1 : count.intValue();
    }

    public User getUser(Long id){
        return null;
    }
}